/*
 * @Author: codeD
 * @Date: 2022-03-01 20:29:06
 * @LastEditors: codeD
 * @LastEditTime: 2022-03-01 21:53:23
 * @Description: file content
 * @FilePath: \dumi\myapp\src\Modal\index.tsx
 */
import React,{useState} from "react"
import './index.less'
import type{Modals} from './type'
const Modal=(props:Modals)=>{
    const {title,visible,onOk,onCancel,className}=props
   
   
        return(
            visible && <div className={`modal-wrap  ${className}`} >
               {title && <div>{title}</div>}
               <button onClick={onCancel}>取消</button>
                <button onClick={onOk}>确定</button>
            </div>  
      

        )
}
export default Modal